package com.lmt.api;

import com.lmt.base.ResultData;
import com.lmt.entity.Audit;
import com.lmt.entity.search.AuditSearch;
import com.lmt.service.AuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Date 2018/07/17
 *
 * @author MT-Lin
 */
@RestController
@RequestMapping("/AuditApi")
public class AuditApi {

	private final AuditService auditService;

	@Autowired
	public AuditApi(AuditService auditService) {
		this.auditService = auditService;
	}

	@RequestMapping("/update")
	public ResultData update(@RequestBody Audit audit) {
		return this.auditService.update(audit);
	}

	@RequestMapping("/search")
	public ResultData search(@RequestBody AuditSearch auditSearch) {
		return this.auditService.search(auditSearch);
	}
}
